
namespace DA.AnimGraph.Editor {

    [NodeMenuItem(typeof(AGANode_SimpleBlend), "Simple Blend")]
    internal class NodeView_SimpleBlend : NodeViewBase {

        public override string titleText => "Simple Blend";
        protected override NodeViewInspectorSourceBase dataSource => inspectorData;
        NodeViewInspector_SimpleBlend inspectorData;

        internal override void Init(AGAHandle_Node handle, AnimGraphView graphView, AGEEnvironment ageContext) {
            inspectorData = new NodeViewInspector_SimpleBlend();
            inspectorData.SetHandle(handle);
            base.Init(handle, graphView, ageContext);
        }

    }


    internal class NodeViewInspector_SimpleBlend : NodeViewInspectorSourceBase {
        [InspectorField] public AGAFieldModel_FloatLink alpha;
        protected override void LoadFromModel() {
            var model = handleKeeper.handle.data.modelProperty as AGANodeModel_SimpleBlend;
            alpha = model.alpha;
        }

        protected override void SaveToModel() {
            handleKeeper.handle.SetDirty();
        }
    }

}
